#define _CRT_SECURE_NO_WARNINGS 1

//#include<iostream>
//
//using namespace std;
//
//const int N = 100010, INF = 0x3f3f3f3f;
//
//int f[N][3];
//int n;
//
//int main()
//{
//    scanf("%d", &n);
//    f[0][0] = 0, f[0][1] = f[0][2] = -INF;
//
//    for (int i = 1; i <= n; i++)
//    {
//        int w;
//        scanf("%d", &w);
//        f[i][0] = max(f[i - 1][0], f[i - 1][2]);
//        f[i][1] = max(f[i - 1][0] - w, f[i - 1][1]);
//        f[i][2] = f[i - 1][1] + w;
//    }
//
//    printf("%d\n", max(f[n][0], f[n][2]));
//    return 0;
//}

#include<iostream>
#include<vector>

using namespace std;

typedef long long LL;

const int N = 12, M = 1 << 10, K = 110;

vector<int> state;
vector<int> head[M];
LL f[N][K][M];
int cnt[M];
int n, m;

bool check(int x)
{
    for (int i = 0; i < n; i++)
        if ((x >> i & 1) && (x >> (i + 1) & 1))
            return false;
    return true;
}

int count(int x)
{
    int res = 0;
    for (int i = 0; i < n; i++)
        res += x >> i & 1;
    return res;
}

int main()
{
    cin >> n >> m;
    for (int i = 0; i < 1 << n; i++)
        if (check(i))
        {
            state.push_back(i);
            cnt[i] = count(i);
        }

    for (int i = 0; i < state.size(); i++)
        for (int j = 0; j < state.size(); j++)
        {
            int a = state[i], b = state[j];
            if ((a & b) == 0 && check(a | b))
                head[i].push_back(j);
        }

    f[0][0][0] = 1;
    for (int i = 1; i <= n + 1; i++)
        for (int j = 0; j <= m; j++)
            for (int a = 0; a < state.size(); a++)
                for (auto b : head[a])
                {
                    int c = cnt[state[a]];
                    if (j >= c)  f[i][j][a] += f[i - 1][j - c][b];
                }

    cout << f[n + 1][m][0] << endl;
    return 0;
}